package cn.tx.service.Impl;

import cn.tx.dao.RoleDao;
import cn.tx.dao.UserDao;
import cn.tx.model.Clazz;
import cn.tx.model.Role;
import cn.tx.model.User;
import cn.tx.service.RoleService;
import cn.tx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleDao roleDao;

    @Override
    public Role findByUserName(String username) {
        return roleDao.findByUserName(username);
    }

    @Override
    public int addRole(Role role) {
        return roleDao.addRole(role);
    }

    @Override
    public List<Role> findList(Map<String, Object> querymap) {
        return roleDao.findList(querymap);
    }

    @Override
    public int findTotal(Map<String, Object> querymap) {
        return roleDao.findTotal(querymap);
    }

    @Override
    public int UpdateRoleById(Role role) {
        return roleDao.UpdateRoleById(role);
    }

    @Override
    public int delete(String ids) {
        return roleDao.delete(ids);
    }
    @Override
    public List<Role> findAll() {
        return roleDao.findAll();
    }


}
